/**
 * @Author: yy
 * @Date: 2019/6/20
 * @Last Modified by: mikey.zhaopeng
 * @Last Modified time: 2019-08-13 15:07:10
 */
import axios from '@/api/fetch';
import * as types from './types';
import SERVER from '@/api/server';
//  获取线索参数列表
export const queryCluesPrameter = params => axios.get(`${SERVER.CYXDMS_CLUE}/consultantWork/consultWorkInfo`, params);

export const queryCluesPrameterCenter = params => axios.get(`${SERVER.CLUECENTER}/consultantWork/consultWorkInfo`, params);

export const updateCluesISpersonnel = params => axios.get(`${SERVER.CLUECENTER}/jk/clue/updateCluesISpersonnel`, { params });

//  新增时获取未配置顾问列表
export const getUncounselorListCenter = params => axios.get(`${SERVER.CLUECENTER}/consultantWork/consultWorkInfoNoAllot`, { params });
//  新增接口
export const addCluesPrameterCenter = params => axios.post(`${SERVER.CLUECENTER}/consultantWork/addConsult`, params);
//  编辑接口
export const editCluesPrameterCenter = params => axios.put(`${SERVER.CLUECENTER}/consultantWork/updConsult`, params);
//  删除接口
export const delCluesPrameterCenter = (params, id) => axios.delete(`${SERVER.CLUECENTER}/consultantWork/delConsult/${id}`, params);
// 设置是否自动分配
export const autoAllocation = params => axios.get(`${SERVER.CLUECENTER}/consultantWork/autoAllocation`, { params });
// 设置是否自动分配
export const getAutoAllocation = params => axios.get(`${SERVER.CLUECENTER}/consultantWork/getAutoAllocation`);
//  查询来源大类列表
export const getCategories = params => axios.get(`${SERVER.CYXDMS_CLUE}/clue/clueSourceLargeCatagory`, { params });
//  根据线索来源大类获取来源细分
export const getPartitionById = id => axios.get(`${SERVER.CYXDMS_CLUE}/clue/clueSourePartition/${id}`, { id: Number(id) });
//  新增时获取未配置顾问列表
export const getUncounselorList = params => axios.get(`${SERVER.CYXDMS_CLUE}/consultantWork/consultWorkInfoNoAllot`, { params });
//  新增接口
export const addCluesPrameter = params => axios.post(`${SERVER.CYXDMS_CLUE}/consultantWork/addConsult`, params);
//  编辑接口
export const editCluesPrameter = params => axios.put(`${SERVER.CYXDMS_CLUE}/consultantWork/updConsult`, params);
//  删除接口
export const delCluesPrameter = (params, id) => axios.delete(`${SERVER.CYXDMS_CLUE}/consultantWork/delConsult/${id}`, params);

// 参数设置
// export const setParameter = params => axios.post(`${SERVER.CYXDMS_CLUE}/basedata/assignsetting/modifySystemPara`, params);
